package com.liuanbang.saro.sarodemo.base;

import android.app.Activity;
import android.support.annotation.NonNull;
import android.view.View;

import com.liuanbang.saro.sarodemo.orther.picker.common.popup.BasicPopup;


/**
 * Created by 刘安邦 on 2016/9/14.
 * Email:liuanbang@aliyun.com
 * 描述:       2016/9/14
 * 修改:       2016/9/14
 */
public abstract class AbstractDialog extends BasicPopup<View> {

    /**
     * Instantiates a new Confirm popup.
     *
     * @param activity the activity
     */
    public AbstractDialog(Activity activity) {
        super(activity);
    }

    @Override
    protected View makeContentView() {
        // View rootView = ((LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.activity_pop_left, null);
        return makeCenterView();
    }

    /**
     * 返回View 方法
     *
     * @return the View
     */
    @NonNull
    protected abstract View makeCenterView();

    /**
     * 接口回调方法,传回一个int型type标记
     */
    public interface OnDialogClickListener {
        void onDialogClick(int type);
    }

    /**
     * 接口回调方法,传回一个int型type标记,键和值
     */
    public interface OnDialogItemSelectListener {
        void onDialogItemSelect(int type, String desc, String value);
    }
}
